module.exports = app => {
    const { STRING, INTEGER, TEXT, DATE, BIGINT, TINYINT } = app.Sequelize;

    const Resume = app.model.define('resume', {
        resume_id: {
            type: BIGINT.UNSIGNED,
            primaryKey: true,
            autoIncrement: true,
        },
        user_id: { type: BIGINT.UNSIGNED, allowNull: false },
        file_url: { type: STRING(255), allowNull: false },
        visibility: { type: TINYINT, allowNull: false, defaultValue: 0 },
        created_at: DATE,
        updated_at: DATE,
    }, {
        tableName: 'resumes',
        timestamps: false,
    });

    return Resume;
};